package com.tarry.decorate.optimize;

/**
 * 抽象装饰器类：用于煎饼的扩展
 */
public abstract class BatterCakeDecorate extends BatterCake{

    // 静态代理、委派
    private BatterCake batterCake;

    public BatterCakeDecorate(BatterCake batterCake){
        this.batterCake = batterCake;
    }

    protected abstract void doSomething();

    @Override
    protected String getMsg() {
        return this.batterCake.getMsg();
    }

    @Override
    protected int getPrice() {
        return this.batterCake.getPrice();
    }
}
